\(\int \frac {(b+2 c x) (a+b x+c x^2)}{(d+e x)^2} \, dx\) [1500]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 24, antiderivative size = 102 \[ \int \frac {(b+2 c x) \left (a+b x+c x^2\right )}{(d+e x)^2} \, dx=-\frac {c (4 c d-3 b e) x}{e^3}+\frac {c^2 x^2}{e^2}+\frac {(2 c d-b e) \left (c d^2-b d e+a e^2\right )}{e^4 (d+e x)}+\frac {\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) \log (d+e x)}{e^4} \]

[Out]

-c*(-3*b*e+4*c*d)*x/e^3+c^2*x^2/e^2+(-b*e+2*c*d)*(a*e^2-b*d*e+c*d^2)/e^4/(e*x+d)+(6*c^2*d^2+b^2*e^2-2*c*e*(-a*
e+3*b*d))*ln(e*x+d)/e^4

Rubi [A] (verified)

Time = 0.07 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.042, Rules used = {785} \[ \int \frac {(b+2 c x) \left (a+b x+c x^2\right )}{(d+e x)^2} \, dx=\frac {\log (d+e x) \left (-2 c e (3 b d-a e)+b^2 e^2+6 c^2 d^2\right )}{e^4}+\frac {(2 c d-b e) \left (a e^2-b d e+c d^2\right )}{e^4 (d+e x)}-\frac {c x (4 c d-3 b e)}{e^3}+\frac {c^2 x^2}{e^2} \]

[In]

Int[((b + 2*c*x)*(a + b*x + c*x^2))/(d + e*x)^2,x]

[Out]

-((c*(4*c*d - 3*b*e)*x)/e^3) + (c^2*x^2)/e^2 + ((2*c*d - b*e)*(c*d^2 - b*d*e + a*e^2))/(e^4*(d + e*x)) + ((6*c
^2*d^2 + b^2*e^2 - 2*c*e*(3*b*d - a*e))*Log[d + e*x])/e^4

Rule 785

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(d + e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && N
eQ[b^2 - 4*a*c, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {c (4 c d-3 b e)}{e^3}+\frac {2 c^2 x}{e^2}+\frac {(-2 c d+b e) \left (c d^2-b d e+a e^2\right )}{e^3 (d+e x)^2}+\frac {6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)}{e^3 (d+e x)}\right ) \, dx \\ & = -\frac {c (4 c d-3 b e) x}{e^3}+\frac {c^2 x^2}{e^2}+\frac {(2 c d-b e) \left (c d^2-b d e+a e^2\right )}{e^4 (d+e x)}+\frac {\left (6 c^2 d^2+b^2 e^2-2 c e (3 b d-a e)\right ) \log (d+e x)}{e^4} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.95 \[ \int \frac {(b+2 c x) \left (a+b x+c x^2\right )}{(d+e x)^2} \, dx=\frac {-c e (4 c d-3 b e) x+c^2 e^2 x^2+\frac {(2 c d-b e) \left (c d^2+e (-b d+a e)\right )}{d+e x}+\left (6 c^2 d^2+b^2 e^2+2 c e (-3 b d+a e)\right ) \log (d+e x)}{e^4} \]

[In]

Integrate[((b + 2*c*x)*(a + b*x + c*x^2))/(d + e*x)^2,x]

[Out]

(-(c*e*(4*c*d - 3*b*e)*x) + c^2*e^2*x^2 + ((2*c*d - b*e)*(c*d^2 + e*(-(b*d) + a*e)))/(d + e*x) + (6*c^2*d^2 +
b^2*e^2 + 2*c*e*(-3*b*d + a*e))*Log[d + e*x])/e^4

Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.13

method result size
default \(\frac {c \left (c e \,x^{2}+3 b e x -4 c d x \right )}{e^{3}}-\frac {a b \,e^{3}-2 a c d \,e^{2}-b^{2} d \,e^{2}+3 b c \,d^{2} e -2 c^{2} d^{3}}{e^{4} \left (e x +d \right )}+\frac {\left (2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}\right ) \ln \left (e x +d \right )}{e^{4}}\) \(115\)
norman \(\frac {\frac {c^{2} x^{3}}{e}+\frac {\left (a b \,e^{3}-2 a c d \,e^{2}-b^{2} d \,e^{2}+6 b c \,d^{2} e -6 c^{2} d^{3}\right ) x}{e^{3} d}+\frac {3 \left (b e -c d \right ) c \,x^{2}}{e^{2}}}{e x +d}+\frac {\left (2 a c \,e^{2}+b^{2} e^{2}-6 b c d e +6 c^{2} d^{2}\right ) \ln \left (e x +d \right )}{e^{4}}\) \(125\)
risch \(\frac {c^{2} x^{2}}{e^{2}}+\frac {3 c b x}{e^{2}}-\frac {4 c^{2} d x}{e^{3}}-\frac {a b}{e \left (e x +d \right )}+\frac {2 a c d}{e^{2} \left (e x +d \right )}+\frac {b^{2} d}{e^{2} \left (e x +d \right )}-\frac {3 b c \,d^{2}}{e^{3} \left (e x +d \right )}+\frac {2 c^{2} d^{3}}{e^{4} \left (e x +d \right )}+\frac {2 \ln \left (e x +d \right ) a c}{e^{2}}+\frac {\ln \left (e x +d \right ) b^{2}}{e^{2}}-\frac {6 \ln \left (e x +d \right ) b c d}{e^{3}}+\frac {6 \ln \left (e x +d \right ) c^{2} d^{2}}{e^{4}}\) \(166\)
parallelrisch \(\frac {c^{2} x^{3} e^{3}+2 \ln \left (e x +d \right ) x a c \,e^{3}+\ln \left (e x +d \right ) x \,b^{2} e^{3}-6 \ln \left (e x +d \right ) x b c d \,e^{2}+6 \ln \left (e x +d \right ) x \,c^{2} d^{2} e +3 x^{2} b c \,e^{3}-3 x^{2} c^{2} d \,e^{2}+2 \ln \left (e x +d \right ) a c d \,e^{2}+\ln \left (e x +d \right ) b^{2} d \,e^{2}-6 \ln \left (e x +d \right ) b c \,d^{2} e +6 \ln \left (e x +d \right ) c^{2} d^{3}-a b \,e^{3}+2 a c d \,e^{2}+b^{2} d \,e^{2}-6 b c \,d^{2} e +6 c^{2} d^{3}}{e^{4} \left (e x +d \right )}\) \(199\)

[In]

int((2*c*x+b)*(c*x^2+b*x+a)/(e*x+d)^2,x,method=_RETURNVERBOSE)

[Out]

c/e^3*(c*e*x^2+3*b*e*x-4*c*d*x)-(a*b*e^3-2*a*c*d*e^2-b^2*d*e^2+3*b*c*d^2*e-2*c^2*d^3)/e^4/(e*x+d)+1/e^4*(2*a*c
*e^2+b^2*e^2-6*b*c*d*e+6*c^2*d^2)*ln(e*x+d)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 172, normalized size of antiderivative = 1.69 \[ \int \frac {(b+2 c x) \left (a+b x+c x^2\right )}{(d+e x)^2} \, dx=\frac {c^{2} e^{3} x^{3} + 2 \, c^{2} d^{3} - 3 \, b c d^{2} e - a b e^{3} + {\left (b^{2} + 2 \, a c\right )} d e^{2} - 3 \, {\left (c^{2} d e^{2} - b c e^{3}\right )} x^{2} - {\left (4 \, c^{2} d^{2} e - 3 \, b c d e^{2}\right )} x + {\left (6 \, c^{2} d^{3} - 6 \, b c d^{2} e + {\left (b^{2} + 2 \, a c\right )} d e^{2} + {\left (6 \, c^{2} d^{2} e - 6 \, b c d e^{2} + {\left (b^{2} + 2 \, a c\right )} e^{3}\right )} x\right )} \log \left (e x + d\right )}{e^{5} x + d e^{4}} \]

[In]

integrate((2*c*x+b)*(c*x^2+b*x+a)/(e*x+d)^2,x, algorithm="fricas")

[Out]

(c^2*e^3*x^3 + 2*c^2*d^3 - 3*b*c*d^2*e - a*b*e^3 + (b^2 + 2*a*c)*d*e^2 - 3*(c^2*d*e^2 - b*c*e^3)*x^2 - (4*c^2*
d^2*e - 3*b*c*d*e^2)*x + (6*c^2*d^3 - 6*b*c*d^2*e + (b^2 + 2*a*c)*d*e^2 + (6*c^2*d^2*e - 6*b*c*d*e^2 + (b^2 +
2*a*c)*e^3)*x)*log(e*x + d))/(e^5*x + d*e^4)

Sympy [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.24 \[ \int \frac {(b+2 c x) \left (a+b x+c x^2\right )}{(d+e x)^2} \, dx=\frac {c^{2} x^{2}}{e^{2}} + x \left (\frac {3 b c}{e^{2}} - \frac {4 c^{2} d}{e^{3}}\right ) + \frac {- a b e^{3} + 2 a c d e^{2} + b^{2} d e^{2} - 3 b c d^{2} e + 2 c^{2} d^{3}}{d e^{4} + e^{5} x} + \frac {\left (2 a c e^{2} + b^{2} e^{2} - 6 b c d e + 6 c^{2} d^{2}\right ) \log {\left (d + e x \right )}}{e^{4}} \]

[In]

integrate((2*c*x+b)*(c*x**2+b*x+a)/(e*x+d)**2,x)

[Out]

c**2*x**2/e**2 + x*(3*b*c/e**2 - 4*c**2*d/e**3) + (-a*b*e**3 + 2*a*c*d*e**2 + b**2*d*e**2 - 3*b*c*d**2*e + 2*c
**2*d**3)/(d*e**4 + e**5*x) + (2*a*c*e**2 + b**2*e**2 - 6*b*c*d*e + 6*c**2*d**2)*log(d + e*x)/e**4

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.15 \[ \int \frac {(b+2 c x) \left (a+b x+c x^2\right )}{(d+e x)^2} \, dx=\frac {2 \, c^{2} d^{3} - 3 \, b c d^{2} e - a b e^{3} + {\left (b^{2} + 2 \, a c\right )} d e^{2}}{e^{5} x + d e^{4}} + \frac {c^{2} e x^{2} - {\left (4 \, c^{2} d - 3 \, b c e\right )} x}{e^{3}} + \frac {{\left (6 \, c^{2} d^{2} - 6 \, b c d e + {\left (b^{2} + 2 \, a c\right )} e^{2}\right )} \log \left (e x + d\right )}{e^{4}} \]

[In]

integrate((2*c*x+b)*(c*x^2+b*x+a)/(e*x+d)^2,x, algorithm="maxima")

[Out]

(2*c^2*d^3 - 3*b*c*d^2*e - a*b*e^3 + (b^2 + 2*a*c)*d*e^2)/(e^5*x + d*e^4) + (c^2*e*x^2 - (4*c^2*d - 3*b*c*e)*x
)/e^3 + (6*c^2*d^2 - 6*b*c*d*e + (b^2 + 2*a*c)*e^2)*log(e*x + d)/e^4

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.76 \[ \int \frac {(b+2 c x) \left (a+b x+c x^2\right )}{(d+e x)^2} \, dx=\frac {{\left (c^{2} - \frac {3 \, {\left (2 \, c^{2} d e - b c e^{2}\right )}}{{\left (e x + d\right )} e}\right )} {\left (e x + d\right )}^{2}}{e^{4}} - \frac {{\left (6 \, c^{2} d^{2} - 6 \, b c d e + b^{2} e^{2} + 2 \, a c e^{2}\right )} \log \left (\frac {{\left | e x + d \right |}}{{\left (e x + d\right )}^{2} {\left | e \right |}}\right )}{e^{4}} + \frac {\frac {2 \, c^{2} d^{3} e^{2}}{e x + d} - \frac {3 \, b c d^{2} e^{3}}{e x + d} + \frac {b^{2} d e^{4}}{e x + d} + \frac {2 \, a c d e^{4}}{e x + d} - \frac {a b e^{5}}{e x + d}}{e^{6}} \]

[In]

integrate((2*c*x+b)*(c*x^2+b*x+a)/(e*x+d)^2,x, algorithm="giac")

[Out]

(c^2 - 3*(2*c^2*d*e - b*c*e^2)/((e*x + d)*e))*(e*x + d)^2/e^4 - (6*c^2*d^2 - 6*b*c*d*e + b^2*e^2 + 2*a*c*e^2)*
log(abs(e*x + d)/((e*x + d)^2*abs(e)))/e^4 + (2*c^2*d^3*e^2/(e*x + d) - 3*b*c*d^2*e^3/(e*x + d) + b^2*d*e^4/(e
*x + d) + 2*a*c*d*e^4/(e*x + d) - a*b*e^5/(e*x + d))/e^6

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.25 \[ \int \frac {(b+2 c x) \left (a+b x+c x^2\right )}{(d+e x)^2} \, dx=\frac {b^2\,d\,e^2-3\,b\,c\,d^2\,e-a\,b\,e^3+2\,c^2\,d^3+2\,a\,c\,d\,e^2}{e\,\left (x\,e^4+d\,e^3\right )}-x\,\left (\frac {4\,c^2\,d}{e^3}-\frac {3\,b\,c}{e^2}\right )+\frac {\ln \left (d+e\,x\right )\,\left (b^2\,e^2-6\,b\,c\,d\,e+6\,c^2\,d^2+2\,a\,c\,e^2\right )}{e^4}+\frac {c^2\,x^2}{e^2} \]

[In]

int(((b + 2*c*x)*(a + b*x + c*x^2))/(d + e*x)^2,x)

[Out]

(2*c^2*d^3 + b^2*d*e^2 - a*b*e^3 + 2*a*c*d*e^2 - 3*b*c*d^2*e)/(e*(d*e^3 + e^4*x)) - x*((4*c^2*d)/e^3 - (3*b*c)
/e^2) + (log(d + e*x)*(b^2*e^2 + 6*c^2*d^2 + 2*a*c*e^2 - 6*b*c*d*e))/e^4 + (c^2*x^2)/e^2